import { IsNumber, IsOptional, IsString } from 'class-validator';

export class CreateCommentDto {
  @IsNumber()
  readonly parent: number;

  @IsNumber()
  readonly root: number;

  @IsNumber()
  readonly articleId: number;

  @IsString()
  readonly content: string;

  @IsString()
  @IsOptional()
  readonly avatarUrl?: string = '';

  @IsString()
  @IsOptional()
  readonly websiteUrl?: string = '';

  @IsString()
  @IsOptional()
  readonly username: string;

  @IsNumber()
  @IsOptional()
  readonly status: number = 1;
}
